﻿
epi.shell.registerInitFunction(function() {
    var jQueryValidateResourceKey = 'EPiServer.Shell.UI.Resources.JQueryValidate';
    jQuery.extend(jQuery.validator.messages, {
        required: epi.shell.resource.get(jQueryValidateResourceKey, "Required"),
        remote: epi.shell.resource.get(jQueryValidateResourceKey, "Remote"),
        email: epi.shell.resource.get(jQueryValidateResourceKey, "Email"),
        url: epi.shell.resource.get(jQueryValidateResourceKey, "Url"),
        date: epi.shell.resource.get(jQueryValidateResourceKey, "Date"),
        dateISO: epi.shell.resource.get(jQueryValidateResourceKey, "DateISO"),
        number: epi.shell.resource.get(jQueryValidateResourceKey, "Number"),
        digits: epi.shell.resource.get(jQueryValidateResourceKey, "Digits"),
        creditcard: epi.shell.resource.get(jQueryValidateResourceKey, "CreditCard"),
        equalTo: epi.shell.resource.get(jQueryValidateResourceKey, "EqualTo"),
        accept: epi.shell.resource.get(jQueryValidateResourceKey, "Accept"),
        maxlength: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "MaxLength")),
        minlength: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "MinLength")),
        rangelength: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "RangeLength")),
        range: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "Range")),
        max: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "Max")),
        min: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "Min")),
        nohtml: $.validator.format(epi.shell.resource.get(jQueryValidateResourceKey, "NoHtml"))
    })
});